package com.softeem.score.manager.mapper;

import com.softeem.score.model.dto.MajorDto;
import com.softeem.score.model.entity.MajorEntity;
import com.softeem.score.model.entity.school.Major;
import com.softeem.score.model.vo.school.CourseMajorVo;
import com.softeem.score.model.vo.school.MajorVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author zhu
 * @since 2024-02-14
 */
public interface MajorMapper {

    void deleteById(Long majorId);

    void updateMajor(Major major);

    void saveMajor(Major major);

    List<MajorVo> findByPage(MajorDto majorName);

    void saveCourseToMajor(@Param("majorId") Long majorId, @Param("courseIds") List<Long> courseIds);

    List<Long> getCheckCollegeByMajorId(Long majorId);

    void deleteMajorCourseByMajorId(@Param("majorId") Long majorId);

    List<MajorEntity> selectMajorListByCollegeId(@Param("collegeId") Long collegeId);

    List<CourseMajorVo> getCourseByMajorId(@Param("majorId") Long majorId);

    void updateCourseMajor(CourseMajorVo courseMajor);

    List<Long> selectAllByMajorId(Long majorId);

    void deleteMajorCourseByMajorIdAndCourseIds(@Param("majorId") Long majorId, @Param("courseIdsToRemoves") List<Long> courseIdsToRemoves);
}
